import Vue from 'vue'
import Router from 'vue-router'
import introduce from '@/components/introduce'
var forbidden = ()=>import ('../components/forbidden')
var film = () =>
  import(/* webpackChunkName: "group-foo" */ "../components/film");
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "/",
      name: "introduce",
      component: introduce,
      beforeEnter: (to, from, next) => {
        next();
      }
    },
    {
      path: "/film/:type/list",
      name: "film",
      component: film,
      props: true
    },
    {
      path: "/film/:type/:id",
      name:'review',
      redirect: "/forbidden"
    },
    {
      path: "/forbidden",
      name: "forbidden",
      component: forbidden
    }
  ]
});
